package cn.signalpha.modules.shop.entity.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum GoodsTypeEnum {

    /**
     * 普通商品
     */
	ONE("普通商品", 1),

	;

	private final String name;
	private final int category;

	public static GoodsTypeEnum instance(int category){
		for(GoodsTypeEnum goodsTypeEnum : values()){
			if (goodsTypeEnum.getCategory() == category) {
				return goodsTypeEnum;
			}
		}
		return null;
	}
}
